Optimal. Leaf size=122 \[ -\frac{\sqrt{3} \log \left (-\sqrt{3} \sqrt [4]{a} x+\sqrt{a}+x^2\right )}{4 \sqrt [4]{a}}+\frac{\sqrt{3} \log \left (\sqrt{3} \sqrt [4]{a} x+\sqrt{a}+x^2\right )}{4 \sqrt [4]{a}}-\frac{\tan ^{-1}\left (\sqrt{3}-\frac{2 x}{\sqrt [4]{a}}\right )}{2 \sqrt [4]{a}}+\frac{\tan ^{-1}\left (\frac{2 x}{\sqrt [4]{a}}+\sqrt{3}\right )}{2 \sqrt [4]{a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0796739, antiderivative size = 122, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161, Rules used = {1169, 634, 617, 204, 628} \[ -\frac{\sqrt{3} \log \left (-\sqrt{3} \sqrt [4]{a} x+\sqrt{a}+x^2\right )}{4 \sqrt [4]{a}}+\frac{\sqrt{3} \log \left (\sqrt{3} \sqrt [4]{a} x+\sqrt{a}+x^2\right )}{4 \sqrt [4]{a}}-\frac{\tan ^{-1}\left (\sqrt{3}-\frac{2 x}{\sqrt [4]{a}}\right )}{2 \sqrt [4]{a}}+\frac{\tan ^{-1}\left (\frac{2 x}{\sqrt [4]{a}}+\sqrt{3}\right )}{2 \sqrt [4]{a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1169
Rule 634
Rule 617
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{2 \sqrt{a}-x^2}{a-\sqrt{a} x^2+x^4} \, dx &=\frac{\int \frac{2 \sqrt{3} a^{3/4}-3 \sqrt{a} x}{\sqrt{a}-\sqrt{3} \sqrt [4]{a} x+x^2} \, dx}{2 \sqrt{3} a^{3/4}}+\frac{\int \frac{2 \sqrt{3} a^{3/4}+3 \sqrt{a} x}{\sqrt{a}+\sqrt{3} \sqrt [4]{a} x+x^2} \, dx}{2 \sqrt{3} a^{3/4}}\\ &=\frac{1}{4} \int \frac{1}{\sqrt{a}-\sqrt{3} \sqrt [4]{a} x+x^2} \, dx+\frac{1}{4} \int \frac{1}{\sqrt{a}+\sqrt{3} \sqrt [4]{a} x+x^2} \, dx-\frac{\sqrt{3} \int \frac{-\sqrt{3} \sqrt [4]{a}+2 x}{\sqrt{a}-\sqrt{3} \sqrt [4]{a} x+x^2} \, dx}{4 \sqrt [4]{a}}+\frac{\sqrt{3} \int \frac{\sqrt{3} \sqrt [4]{a}+2 x}{\sqrt{a}+\sqrt{3} \sqrt [4]{a} x+x^2} \, dx}{4 \sqrt [4]{a}}\\ &=-\frac{\sqrt{3} \log \left (\sqrt{a}-\sqrt{3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt [4]{a}}+\frac{\sqrt{3} \log \left (\sqrt{a}+\sqrt{3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt [4]{a}}+\frac{\operatorname{Subst}\left (\int \frac{1}{-\frac{1}{3}-x^2} \, dx,x,1-\frac{2 x}{\sqrt{3} \sqrt [4]{a}}\right )}{2 \sqrt{3} \sqrt [4]{a}}-\frac{\operatorname{Subst}\left (\int \frac{1}{-\frac{1}{3}-x^2} \, dx,x,1+\frac{2 x}{\sqrt{3} \sqrt [4]{a}}\right )}{2 \sqrt{3} \sqrt [4]{a}}\\ &=-\frac{\tan ^{-1}\left (\sqrt{3}-\frac{2 x}{\sqrt [4]{a}}\right )}{2 \sqrt [4]{a}}+\frac{\tan ^{-1}\left (\sqrt{3}+\frac{2 x}{\sqrt [4]{a}}\right )}{2 \sqrt [4]{a}}-\frac{\sqrt{3} \log \left (\sqrt{a}-\sqrt{3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt [4]{a}}+\frac{\sqrt{3} \log \left (\sqrt{a}+\sqrt{3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt [4]{a}}\\ \end{align*}
Mathematica [C] time = 0.157455, size = 115, normalized size = 0.94 \[ \frac{\sqrt [4]{-1} \left (\sqrt{\sqrt{3}-i} \left (\sqrt{3}-3 i\right ) \tanh ^{-1}\left (\frac{(1+i) x}{\sqrt{\sqrt{3}+i} \sqrt [4]{a}}\right )-\sqrt{\sqrt{3}+i} \left (\sqrt{3}+3 i\right ) \tan ^{-1}\left (\frac{(1+i) x}{\sqrt{\sqrt{3}-i} \sqrt [4]{a}}\right )\right )}{2 \sqrt{6} \sqrt [4]{a}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.073, size = 96, normalized size = 0.8 \begin{align*}{\frac{\sqrt{3}}{4}\ln \left ({x}^{2}+\sqrt [4]{a}x\sqrt{3}+\sqrt{a} \right ){\frac{1}{\sqrt [4]{a}}}}+{\frac{1}{2}\arctan \left ({ \left ( 2\,x+\sqrt{3}\sqrt [4]{a} \right ){\frac{1}{\sqrt [4]{a}}}} \right ){\frac{1}{\sqrt [4]{a}}}}-{\frac{\sqrt{3}}{4}\ln \left ( \sqrt [4]{a}x\sqrt{3}-{x}^{2}-\sqrt{a} \right ){\frac{1}{\sqrt [4]{a}}}}-{\frac{1}{2}\arctan \left ({ \left ( \sqrt{3}\sqrt [4]{a}-2\,x \right ){\frac{1}{\sqrt [4]{a}}}} \right ){\frac{1}{\sqrt [4]{a}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} -\int \frac{x^{2} - 2 \, \sqrt{a}}{x^{4} - \sqrt{a} x^{2} + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.67147, size = 682, normalized size = 5.59 \begin{align*} \frac{1}{2} \, \sqrt{\frac{1}{2}} \sqrt{\frac{\sqrt{3} a \sqrt{-\frac{1}{a}} + \sqrt{a}}{a}} \log \left (\sqrt{\frac{1}{2}} \sqrt{a} \sqrt{\frac{\sqrt{3} a \sqrt{-\frac{1}{a}} + \sqrt{a}}{a}} + x\right ) - \frac{1}{2} \, \sqrt{\frac{1}{2}} \sqrt{\frac{\sqrt{3} a \sqrt{-\frac{1}{a}} + \sqrt{a}}{a}} \log \left (-\sqrt{\frac{1}{2}} \sqrt{a} \sqrt{\frac{\sqrt{3} a \sqrt{-\frac{1}{a}} + \sqrt{a}}{a}} + x\right ) + \frac{1}{2} \, \sqrt{\frac{1}{2}} \sqrt{-\frac{\sqrt{3} a \sqrt{-\frac{1}{a}} - \sqrt{a}}{a}} \log \left (\sqrt{\frac{1}{2}} \sqrt{a} \sqrt{-\frac{\sqrt{3} a \sqrt{-\frac{1}{a}} - \sqrt{a}}{a}} + x\right ) - \frac{1}{2} \, \sqrt{\frac{1}{2}} \sqrt{-\frac{\sqrt{3} a \sqrt{-\frac{1}{a}} - \sqrt{a}}{a}} \log \left (-\sqrt{\frac{1}{2}} \sqrt{a} \sqrt{-\frac{\sqrt{3} a \sqrt{-\frac{1}{a}} - \sqrt{a}}{a}} + x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: PolynomialError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]